'''
Created on Sep 4, 2012

@author: kingsfield
'''
from collections import defaultdict
import csv
from util import Util, Constant
import time
import math

wd = "/home/kingsfield/Desktop/kaggle/"

def test():
    """Write the predictions with bayes query modification out"""
    with open(wd + "train.csv") as infile:
        reader = csv.reader(infile, delimiter=",")
        reader.next() # burn the header
        for (__user, __sku, category, query, __click_time, __query_time) in reader:
            words = Util.wordutil.getwords(query)
            for w in words:
                if w == 'tvtelevisions':
                    print query

if __name__ == '__main__':
    test()
    print 'done'
